<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            height: 3000px;
        }
        img{
          width: 100px;
          height: 100px;  
          position: absolute;
        }
    </style>
</head>
<body>
    <img src="./1.gif" alt="">
    <script>
        document.addEventListener('mousemove',function(e){
            e.stopPropagation()
            var img1 = document.querySelector('img')
            console.log(e.pageX,e.pageY);
            img1.style.left = e.pageX - 48+'px'
            img1.style.top = e.pageY -48 +'px'
        })
    </script>
</body>
</html>